<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        document.write(Math.PI + "<br>");
        document.write(Math.round(3.223) + "<br>");
        document.write(Math.random() + "<br>");

        document.write(Math.ceil(8.3) + "<br>");
        document.write(Math.floor(9.9) + "<br>");


        //生成随机数
        var random = Math.ceil(Math.random() * 100) + 1;
        document.write(random);


        function createRandom(start, end) {
            return Math.round(Math.random() * (end - start)) + start;
        }

        for (var i = 0; i < 100; i++) {
            document.write(createRandom(1, 100) + "<br>");
        }
    </script>
</head>
<body>

</body>
</html>